package com.example.homework.api

import com.example.homework.model.User
import okhttp3.MultipartBody
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
import com.example.homework.model.ApiResponse

interface RankApi {
    @POST("user/getRank")
    suspend fun getRankData(): Response<ApiResponse<List<User>>>

    @POST("user/update")
    suspend fun updateUser(@Body user: User): Response<User>

    @Multipart
    @POST("user/upload")
    suspend fun uploadImage(
        @Part image: MultipartBody.Part
    ): Response<ApiResponse<String>>
}